package com.demo1;


/**
 * @author zhoujun
 * @date 2025/3/26 23:41
 */
public class ConcreteMediatorClient {
    public static void main(String[] args) {

        //创建一个中介者对象
        ConcreteMediator mediator = new ConcreteMediator();

        ConcreteColleagueA concreteColleagueA = new ConcreteColleagueA(mediator);
        ConcreteColleagueB concreteColleagueB = new ConcreteColleagueB(mediator);
        ConcreteColleagueC concreteColleagueC = new ConcreteColleagueC(mediator);

        concreteColleagueA.send("你好,我是同事A");
        concreteColleagueB.send("你好,我是同事B");
        concreteColleagueC.send("你好,我是同事C");
        //1对多
    }
}
